package com.wzw.tmaceventbus;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.wzw.tmaceventbus.eventbus.TmacEventBus;

public class SecondActivity extends AppCompatActivity {
    private TextView tvPost, tvPost2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
        tvPost = findViewById(R.id.tvPost1);
        tvPost2 = findViewById(R.id.tvPost2);
        tvPost.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                TmacEventBus.getDefault().post(new CommonEvent("更新"));
                finish();
            }
        });


        tvPost2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                TmacEventBus.getDefault().post(new CommonEvent2("更新2"));
                finish();
            }
        });
    }


}